import type { Recordable } from '@vben/types';
import { requestClient } from '#/api/request';

export async function add(data) {
  return requestClient.post('/device/airport/addAirport', data);
}

export async function edit(data) {
  return requestClient.post('/device/airport/editAirport', data);
}

export async function getAirportById(data) {
  return requestClient.post('/device/airport/getAirportById', data);
}

export async function getAirportList(data) {
  return requestClient.post('/device/airport/getAirportList', data);
}

export async function deleteAirport(data) {
  return requestClient.post('/device/airport/deleteAirport', data);
}

// 无人机
export async function addDrone(data) {
  return requestClient.post('/device/drone/addDrone', data);
}

export async function editDrone(data) {
  return requestClient.post('/device/drone/editDrone', data);
}
export async function getDroneList(data) {
  return requestClient.post('/device/drone/getDroneList', data);
}

export async function getDroneById(data) {
  return requestClient.post('/device/drone/getDroneById', data);
}
export async function deleteDrone(data) {
  return requestClient.post('/device/drone/deleteDrone', data);
}

export async function getNoBindDrone(data) {
  return requestClient.post('/device/drone/getNoBindDrone', data);
}
// 获取机场列表不分页
export async function getAirportListNoPage(data) {
  return requestClient.post('/device/airport/getAirportList1', data);
}

// 获取无人机飞行日志
export async function getFlightList(data) {
  return requestClient.post('/device/flightLog/getFlightList', data);
}

// 飞行轨迹
export async function getFlightLog(data) {
  return requestClient.post('/device/flightLog/getFlightLog', data);
}

//获取mqtt配置
export async function getMqtt(data) {
  return requestClient.post('/device/config/mqtt', data);
}